perm filename USEMUS.LCS[UP,DOC]11 blob
sn#293014 filedate 1977-07-08 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00011 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002 ********** Using the Music System -- MUS10 **********
C00021 00003 A type of flow-chart diagram for SIMP would appear as follows:
C00024 00004
C00028 00005 In the next example a unit generator will be added above the right
C00034 00006 Various types of noise and other random fluctuations are
C00040 00007
C00049 00008
C00054 00009 ********** APPENDIX XXX NOT COMPLETE!!!XXX ************
C00056 00010 ********* SOME INFO RE. THE 'FUNC' PROGRAM ***********
C00059 00011 Information re. WAVES. To run it type R WAVES.
C00062 ENDMK
C⊗;
********** Using the Music System -- MUS10 **********
******* WORK IN PROGRESS -- JUNE 76 -- LELAND SMITH *********
This manual is designed for use with the PDP10 at the Stanford AI lab.
It is quite possible that several features discussed will not be
operative on other installations. See appendix for some details.
MUSIC is a complete sound generating package which exists on the
disk. For first attempts type:
R MUSIC
(All lines must be terminated with the 'RETURN' key.)
At this point the program will type the message:
INPUT?
Basically there are two responses possible. If the program is to
receive further instructions from another file which has been
prepared with an editing program, type:
NAME -- where NAME is the name of the file to be read.
(If NAME has an extension, it must be used!)
If instructions are to be entered by means of the teletype keyboard
(TTY mode), type carriage return (<CR>).
At this point a star (*) will appear which means the program is
awaiting input.
(It is possible that an error message such as "Ill mem. rel" or
"Halt" will sometimes appear. If this happens first type 'S' -- to
restart the program -- and then type in exactly whatever you had
typed before. If the error message recurs, find an "expert.")
Most complete statements to be read by MUSIC must end with a
semicolon. Several complete statements may be entered on a single
line but it is best not to have the lines too long. More than one
line may be used for a single statement. If the less-than sign (<)
appears everything following on that line will be ignored. Use this
for entering comments.
***** Note that the above rules DO NOT apply to the syntax
of the SCORE program.
Already present in MUSIC is an "instrument" known as SIMP which has
been set to play a test tone of 'A' (440 hz) for 1/2 second.
In order to play this tone, first get into TTY mode as described
above, then type:
PLAY;SIMP;FINISH;
When the computation begins "TEST.SND" will be typed out. This means
that sound data is being written on the disk under the name
"TEST.SND." When the computation is finished the program will type
"TEST AMPL.=2000." Immediately after this the following message will
appear: SPEED?, <CR>, OR "X". This means you have three options.
<CR> means to hit the "RETURN" key. This will cause the computed
sound to play (unless someone else's program has momentary control
over the devices you need.) Each time you hit the "RETURN" key the
sound will play again.
The sound will be playing at SPEED 1. The SPEEDs available are 0
through 5. 0 plays 1/2 as fast as 1, hence an octave lower; 2 play
twice as fast; 3 plays four times as fast; 4 play eight times as
fast; 5 plays sixteen times as fast. If a SPEED number is typed (DO
NOT hit "RETURN" here) then "GO?" will be appear. At this point type
any other character (other than <CR> or X) to hear the sound. If you
type "X" the program will exit from the "play" mode and return the
symbol "*", which means it is waiting for some new command. When "X"
is typed, you will get the message "PLEASE DELETE TEST.SND." This
means that when you have finished your work you should type <CALL>,
then "DEL TEST.SND <CR> so the space on the disk taken up by your
sound tests may be reclaimed.
If you have typed an "X" but wish to return to "play" mode, type $P;
where '$' indicates the 'ALT' key.
******************************************************
The instrument SIMP has five parameters.
P1 = begin time of note (in seconds)
P2 = duration of note " "
P3 = pitch
P4 = amplitude
P5 = wave form (or timbre)
P1 and P2 will have the same significance in all instruments but all
higher numbered parameters are assigned roles according to
convenience. (However it will prove useful to consistently apply P3
and P4 as above.)
Internally all pitch entries become numerical, however the twelve
frequencies of the tempered chromatic scale, from middle C (261.62
hz) up to B may be used in MUSIC by typing the letter names of the
notes. The letter S = #, F = flat.
Since these letters merely represent the frequencies of each note,
the octave range may be changed by multiplying or dividing by
multiples of two. Thus C or A in the octave below middle C would be
entered as C/2 or A/2. In the octave above the basic middle octave
these notes would be C*2 or A*2.
C -- 2 octaves down would be C/4
C -- 3 octaves down would be C/8
C -- 2 octaves up would be C*4
C -- 3 octaves up would be C*8 etc.
To test the use of these letters try:
P3←C;PLAY;SIMP;FINISH;
Now instrument SIMP will compute middle C instead of A. The left
arrow (←) indicates that the value of C has been placed in P3,
replacing any value that was previously there. (The left arrow and
the equals sign[=] are interchangeable in this program.)
PLAY;SIMP;FINISH; must be typed so the new note will be computed.
After it is first heard it may be repeated as indicated above.
If frequencies other than those of the tempered scale are to be
played, a number may be used instead of a letter.
P3←1000;PLAY;SIMP;FINISH; will play a tone at 1000 hz.
The amplitude scale available is the range of number from 0 to 2047.
(This upper limit is set by the number of bits [12] used for the
sound samples. See appendix.) P4 has been set at 2000 for the test
tone. This may be reset using the same method as described before.
P4←100;P3←GS*2;PLAY;SIMP;FINISH;
This will play a G# above the middle octave at amplitude 100.
The duration of the tone may be changed be resetting P2.
P2←.1; etc. will play a note of 1/10 sec. duration.
In general, test tones should rarely exceed 1" duration.
When several parameters are to be changed at once the following
type-in format should be used:
PLAY;SIMP 0 .2 FS/2 850;FINISH;
This will play F# below middle C for 2/10" at an amplitude of 850.
(Please note that P5, the wave form for SIMP, will be dealt with
later.)
********** COMMAS **********
Commas may be used to separate the parameters and if nothing precedes
a comma the contents of that parameter remains unchanged. Also any
parameter numbers higher than the length of the list will not be
affected.
PLAY;SIMP ,.3,,1200;FINISH; changes only P2 and P4.
******************************************************
A string of notes may be played with the following input:
PLAY;SIMP 0 .2 C 1500;SIMP .2,,D;SIMP .4,,E;
SIMP .6,,C;FINISH;
In this case P1 must be updated for each note. (Never overlap an
instrument with itself. Distortion will occur.) P2, the note
duration remains unchanged, so the commas suffice for the last three
notes. P4, coming at the end of the list for the first note need
only be stated once if it is not to change.
Rests are created by simply leaving some time between the end of one
note (P1+P2) and the beginning of the next (the new P1).
PLAY;SIMP 0 .2 C;SIMP .5;FINISH; will play C for 2/10",
rest for 3/10" and then play another C for 2/10".
********** FUNCTIONS **********
The wave form in P5 is entered by means of a name which is used by
the program to locate a list, or array, of numbers (512) which
describe the wave. The names used for this purpose will always be F
followed directly by a number. These arrays will be called
"functions."
Only one function is in MUSIC, although more can be added. The
function present is known as F3 and describes a sine wave. To see
this wave on the CRT type:
SEE(F3);
To clear the screen hit the 'ESC' key followed by a 'C'. (This is
called ESCAPE C.) <CR> will bring back the typescript display if it
is gone.
Functions may be created with an external program called FUNC or
within MUSIC itself by means of two routines called SYNTH and SEG.
SYNTH is used to create composites made by adding various harmonics
together. The form of F3 could be changed in the following manner:
SYNTH(F3); 1,1 2,1 3,.5 999;
In the three pairs of numbers, the first of each pair represents the
harmonic number and the second the relative amplitude of that
harmonic. Thus the ratios of harmonics 1, 2 and 3 will be 1:1:.5 .
The size of the second number of each pair is important only in its
relation to the other amplitude numbers. The last number, 999, is
used to signal the termination of a string of entries.
Several pairs may entered and harmonic numbers up to 256 may be used
but in practice great care must be taken to avoid the "foldover"
effect which occurs when frequencies higher than one half the
sampling rate are present. (See appendix.)
It should be pointed out that the fundamental (harmonic #1) need not
be present in a wave.
SYNTH(F3); 10,1 12,1 15,1 999; will give the three notes
of a minor chord. After this has been entered the following will
cause a C minor chord to play:
PLAY;SIMP 0 .5 GS/8;FINISH;
While the lowest Ab (or G#) on the piano keyboard has been indicated,
since the wave form includes only the 10th, 12th and 16th harmonics,
the notes middle C, Eb and G will be heard.
Several experiments with different wave forms should be made. Be
sure to SEE the waves so a visual-aural connection might be made.
A function may be changed in the middle of a PLAY routine but it must
be noted that the new wave definition must follow! the note which it
is to affect.
In PLAY;SIMP 0 .3 D 1000; SIMP .3; SYNTH(F1); 1,.7 3,.2
5,.1 999; SIMP .6,,E; FINISH; the newly defined wave
will be heard in the second and third notes.
If you wish to have several functions with different names available
and you do not create them with the FUNC program, their names must be
"declared" to MUSIC. Suppose you wish to have F1, F2 and F4. You
must type directly to MUSIC (or into an EDIT file which will be read
by MUSIC) the following:
ARRAY F1,F2,F4(512);
The "(512)" indicates that each function array will require 512 words
of storage.
The following example will play a sequence of notes wherein are heard
the 10th, 14th and 18th harmonics of a low C, then the 10th, 13th and
16th, and finally the 10th, 12th and 14th harmonics.
As each SYNTH function is typed in the wave will be
displayed (at some terminals.) If you wish a clear screen after the
last one has appeared, hit the 'ESC' key followed by a 'C'. (This is
called ESCAPE C.)
ARRAY F1,F2(512);
SYNTH(F1);10,1 14,1 18,1 999;
SYNTH(F2);10,1 13,1 16,1 999;
SYNTH(F3);10,1 12,1 14,1 999;
PLAY;SIMP 0 .3 C/4 2000 F1;
SIMP .3,,,,F2;SIMP .6,,,,F3;FINISH;
From this point on it would probably be better to prepare any
input for MUSIC which requires more than a couple of lines of typing
with the SOS or ETV editors. Typographical errors are inevitable and
when an error is made near the beginning of a string of input typed
directly to MUSIC you most likely will have to retype everything.
A type of flow-chart diagram for SIMP would appear as follows:
P4 MAG*P3
| |
↓ ↓
***************
* * OSCIL
* * U1 (UNIT GENERATOR ONE)
* P5 *
* *
* *
*********
|
↓
*****
* OUT *
* A *
*****
The top left input, P4, serves simply as a multiplier for the numbers
found in the wave form array, P5. The particular number from the
array to be multiplied is determined by the number in the upper right
input. The upper right input, in this case P3, when processed by
"MAG" (the "magic" number) becomes the increment, the rate at which
the wave form array is stepped through. The "magic" number is found
by dividing the array length, 512, by the sampling rate, 12800 (for
SPEED 1.)
512/SRATE=.04 (Higher sampling rates will be discussed later.)
The maximum size of the numbers in the wave array is + or -1. Thus
if P4 is set to 1000 the output of the OSCIL will be numbers in the
range +1000 to -1000 which will describe the wave form put into P5
cycling at the rate given in P3.
The code for entering this instrument follows:
INSTRUMENT SIMP;
OSCIL(P4,MAG*P3,P5);
OUTA←OUTA+U1;
END;
This instrument has only one unit generator (the OSCIL) hence the
output of U1 is added to the contents of OUTA. If there are several
instruments the outputs of all the instruments will be combined in
OUTA for each sample.
It will be noticed when playing instrument SIMP that the sound begins
and ends quite abruptly. This is because no attack-decay envelope
has been applied to the tone. The sound begins at the full amplitude
of P4 and remains at that level for its total duration.
To apply an envelope, another unit generator must be added.
P4 MAG/P2
| |
↓ ↓
***************
* * OSCIL
* * U1 (UNIT GENERATOR ONE)
* P5 *
* *
* *
*********
|
| MAG*P3
| |
↓ ↓
***************
* * OSCIL
* * U2 (UNIT GENERATOR TWO)
* P6 *
* *
* *
********* INSTRUMENT TOOT;
| OSCIL(P4,MAG/P2,P5);
↓ OSCIL(U1,MAG*P3,P6);
***** OUTA←OUTA+U2;
* OUT * END;
* A *
*****
To create this instrument the definition listed above must be typed
in. Now that the instrument has been expanded you will note that it
is the output of unit generator two (U2) which goes to OUTA.
P5 will now contain the envelope array. This array is best defined
by the SEG routine. SEG defines the positions of line segments used
to approximate a curve. With SEG several pairs of numbers may be
entered. The first number of each pair is an amplitude, normally in
the range of 0 to 1, and the second is the step number in the array.
The step numbers 1 through 100 are used in SEG. (However the step
numbers are converted internally to 512 array locations.) Straight
line segments are drawn between each of the points defined. The
following would put a triangular envelope shape into F1:
ARRAY F1(512);
SEG(F1); 0,1 1,50 0,100;
Note that the routine is terminated when step 100 is reached.
DO NOT USE 999 with SEG.
After having typed in the code for instrument TOOT and the definition
for an envelope in F1, the following will produce a note using that
envelope:
SYNTH(F3);1,1 2,.4 3,.1 999;< Sets the tone color.
PLAY;TOOT 0 .5 A 2000 F1 F3;FINISH;
If two envelopes are to be contrasted add another function and define
it.
ARRAY F2(512);
SEG(F2); 0,1 1,7 .2,25 .1,60 0,100;< Staccato
PLAY;TOOT 0 .2 1000 2000 F2 F3; < P5 has envelope
TOOT .2 .5,,,F1;FINISH;<Plays stac. then sust.(F1 then F2)
In the next example a unit generator will be added above the right
side of the bottom, tone producing unit generator. In this way a
function may be used to describe fluctuations of pitch within the
duration of a note -- much as the previous example gave the
possibility for changing the amplitude during a single note.
MAG*P7-MAG*P3 MAG/P8
P4 MAG/P2 | |
| | ↓ ↓
↓ ↓ ***************
*************** * * OSCIL
* * OSCIL * * U2
* * U1 * P9 *
* P5 * * *
* * * *
* * *********
********* MAG*P3 |
| | _____________|
|________ _↓___↓_
| \ /
| \ + /
| \_/
| |
↓ ↓
***************
* *
OSCIL * *
U3 * P6 *
* *
* *
********* INSTRUMENT GLISS;
| OSCIL(P4,MAG/P2,P5);
↓ OSCIL(MAG*P7-MAG*P3,MAG/P8,P9);
***** OSCIL(U1,MAG*P3+U2,P6);
* OUT * OUTA←OUTA+U3; END;
* A *
*****
In order for this instrument to perform glissandos, a third function
must be defined for P9 (the "shape" of the glissando). A straight
line slope will suffice for a simple glissando. After typing in the
instrument definition set up the three functions.
ARRAY F5,F6(512); <F3 is already present.
SEG(F5);0,1 .8,7 1,12 1,90 0,100;<Envelope
SEG(F6);0,1 1,100; <Slope
In the preceding, the ARRAY declaration is needed only when some new
function names are to be used.
The following will play a glissando up two octaves, from C to C*4.
PLAY; GLISS 0 1 C 2000 F5 F3 C*4 1 F6; FINISH;
If P8←.5; (while P2 remains at 1) two glissandos will be heard.
This instrument may be used for a dramatic demonstration of
"foldover", the phenomenon which occurs when a frequency exceeds the
upper limit of one half the sampling rate. (See Mathews' book for a
technical explanation.)
For this purpose it is best to use a Sine wave in P6.
SYNTH(F3); 1 1 999;
PLAY; GLISS 0 1 1000 2000 F5 F3 4000 1 F6;FINISH;
This first note will slide up from 1000 hz to 4000 hz.
PLAY; GLISS 0 1 1000 2000 F5 F3 11800 1 F6;FINISH;
Due to "foldover" (at 12800/2 hz.) this note will slide up to 6400 hz
and return to the 1000 hz level even though 11800 hz was given in P7.
The general rule for "foldover" is that any frequencies which exceed
one half the sampling rate will be heard at (SRATE-F) hz.
Try this one!
PLAY; GLISS 0 1 0 2000 F5 F3 30000 1 F6; FINISH;
This same instrument may be used to produce a vibrato by putting a
sine wave into P9, setting P8←1/7; (the vibrato rate will be 7 times
per second) and making P7 some very small amount different from P3.
PLAY; GLISS 0 1 C 2000 F5 F3 C+2 1/7 F1; FINISH;
(It is assumed that F1 is a sine wave.)
Various types of noise and other random fluctuations are
produced by the two random number unit generators. These are called
RANDH and RANDI. RANDH (H=hold) produces in effect a function made
up of horizantal lines at various levels with a perpendicular jump
from one level to the next. There are two inputs to RANDH. The
first (left hand) gives the range, plus or minus, of random
selection and the second (right hand) gives the rate (per second) at
which the selections are to be made.
Care must be taken with the number in the first input. If
the number 100 is given, the output of RANDH will fluctuate between
+100 and -100. Thus if a range of 100 to 200 is desired, the input
number should be 50 and the number 150 must be added to the output.
MAG*P7 MAG*P8
P4 MAG/P2 | |
| | ↓ ↓
↓ ↓ ***************
*************** * *
* * OSCIL * RANDH * U2
* * U1 ***************
* P5 * |
* * |
* * |
********* MAG*P3 |
| | _____________|
|________ _↓___↓_
| \ /
| \ + /
| \_/
| |
↓ ↓
***************
* *
OSCIL * *
U3 * P6 *
* *
* *
********* INSTRUMENT NOISE;
| OSCIL(P4,MAG/P2,P5);
↓ RANDH(MAG*P7,MAG*P8);
***** OSCIL(U1,MAG*P3+U2,P6);
* OUT * OUTA←OUTA+U3; END;
* A *
*****
ARRAY F2(512); <F3 is already present.
SEG(F2);0,1 .8,7 1,12 1,90 0,100;<Env.
The following will produce white noise.
SRATE←25600;MAG←512/SRATE;
PLAY;NOISE 0 .5 C*8 1000 F2 F3 P3 P3*4;FINISH;
Actually P8 (given as P3*4) can probably be left at a number
like 4000 for noise purposes. As P7 is changed the apparent
band-width of the noise will be changed. As the band-width gets
narrower the center frequency becomes more apparent. Thus if P7←P3/16
and P3 is up in the range of C*8, something of the effect of blowing
across an open tube will be produced. The pitch is clear -- but
quite windy.
The SRATE (sampling rate) must be increased for noise
production since very high frequencies are essential. At SRATE←25000
the high frequency cut-off will be at 12800 hz.
If P8 is set to a low number (e.g. 8) individual random
pitches, instead of noise, will be produced at that rate.
If the random unit generator is replaced by a RANDI the
random function produced will be made up of a series of slopes
(I=interpolating) up and down from one random point to another. In
the case of noise production there is little difference between RANDI
and RANDH. However RANDI is necessary for getting such things as
random vibrato. The following will produce an acceptable, "human"
sounding vibrato.
PLAY; NOISE 0 1 C*2 1000 F2 F3 P3*.01 16; FINISH;
The random rate of 16 per second (in P8) is considerably
faster than the human vibrato rate of 5 to 8 per second. In this
case however since the full band-width (in P7) is only seldom
attained and the heard effect is that of a rate much slower than 16.
With an ordinary OSCIL there is no simple way to have a long note
keep the same characteristics of attack and decay as a short note.
The LINEN unit generator is used to create envelopes with separate
controls over attack time, decay time and steady state.
P7 P8 P9
| | |
P4 ↓ ↓ ↓ VAR
| *************** |
| * * | LINEN
| * * | U1 (UNIT GENERATOR ONE)
---→ * P5 * ←---
* *
* *
***************************
|
| MAG*P3
| |
↓ ↓
***************
* * COSCIL
* * U2 (UNIT GENERATOR TWO)
* P6 *
* * VARIABLE /VAR;
* *
********* INSTRUMENT LIN;
| LINEN(P4,P7,P8,P9,P5,VAR);
↓ COSCIL(U1,MAG*P3,P6);
***** OUTA←OUTA+U2;
* OUT * END;
* A *
*****
The parameter arrangement for LINEN is rather different from that for
OSCIL. The far left parameter (P4) is, as usual, an amplitude input.
The next three (P7, P8 and P9 in this particular example) will
receive the attack duration, the decay duration and the total
duration of the envelope, in that order. The next item in the
parameter list (P5 here) will contain the envelope array name. The
last item is a "run-time" variable which is needed to ensure that
each note uses the correct portion of the overall envelope.
The internal workings of LINEN make it unnecessary to use "MAG" with
the 3 time domain parameters. The proper conversion of time to
increments is automatic. The 3rd parameter (P9) of this group could
have been P2. However since P2 is always a special parameter which
tells how long the instrument is to be turned, its use to indicate
the total duration of the envelope would make it impossible to play
several notes within one envelope cycle (a phrase.)
The array used for LINEN must be defined in a special way. Only the
first 2/3 of the available locations are to be used. When using SEG,
steps 1-25 are reserved for the attack portion, steps 26-50 for the
"steady state" and steps 51-75 for the decay portion. Steps 76-100
are ignored by LINEN but must be included in the SEG input in order
for the SEG routine to conclude properly. To test the properties of
LINEN it is best to construct an envelope with dramatic changes.
ARRAY F2(512);
SEG(F2); 0,1 1,2 .3,25 1,50 0,75 0,100;
If parameters 7, 8 and 9 are set properly, this array will give a
sharp attack followed by a return to a low amplitude (.3) at the
start of the "steady state" section. Following there will be a
relatively slow crescendo to full amplitude and then a rapid decay.
It must be emphasized that the sum of the values given for P7 and P8
(attack and decay) must never exceed the value of P9 (total
duration.) Likewise, P9 should never be less than P2, (the total time
the instrument is turned on for a single note.) To visualize the true
shape of the envelope for any particular note duration (ND) consider
that the time spent in the middle section of the array (SS="steady
state" area) will be what is left when the attack (AT) and decay (DK)
are subtracted from the total duration (TD.)
SS = TD - AT - DK
To play the following notes add about 5k to your core image.
PLAY; LIN 0 1 A 2000 F2 F3 .08 .08 1; VAR=0; FINISH;
The special variable VAR is used to reset a pointer for the
initialization of the envelope. When a variable is declared with a
preceding slash ( /VAR ) it is known as a "run-time" variable. This
means that, unlike ordinary parameters which are read by an
instrument only at the beginning of a note (at input time, or
"I-time"), a "run-time" variable is read or changed every time a
sample is computed. A unique variable must be used for each LINEN
unit generator. The variable must be set to 0 immediately after!
each detached note or after the first note of a phrase.
In the following, the 2 notes D, F will be connected (phrased) and
the 3rd note, C#, will be detached. Notice that the first value
given in P9 (total duration of envelope) represents the total
duration of the first 2 notes. P9 is changed to equal P2 for the
separate note.
PLAY; LIN 0 .5 D 2000 F2 F3 .08 .08 1; VAR=0;
LIN .5 .5 F; < P4 to P9 remain the same.
LIN 1 .5 CS 2000 F2 F3 .08 .08 .5; VAR=0;
FINISH;
You will have noticed that the last unit generator in this instrument
is called a COSCIL. This is exactly like an OSCIL except that the
pointer to the array is never re-initialized. This allows the wave
form produced to be continuous from one note to the next. (The "C"
indicates it is a "continuing" OSCIL). If an OSCIL were used in this
situation clicks would often be heard between phrased notes.
Frequency modulation allows for the production of a wide
variety of tone colors using relatively little compute time. The
INTRP unit generator is really just a combination of an OSCIL and an
ADD box. The left input represents the output when the function (P10
below) is at zero and the right input represents the output when the
function is at 1 (peak amplitude). No time input is given with
INTRP. The speed of stepping through the function array is always
taken as being P2, i.e. the note duration. In this case P10 will
contain an envelope which will control the changes in frequency
modulation. For a full explanation of FM see John Chowning's AES
Journal article on this subject.
P9*P7*MAG P8*P9*MAG
| |
↓ ↓
***************
* *
* P10 * INTRP
* * U2
* *
* *
* *
* P9*MAG
P4 MAG/P2 | |
| | ↓ ↓
↓ ↓ ***************
*************** * * OSCIL
* * OSCIL * * U3
* * U1 * P11 *
* P5 * * *
* * * *
* * *********
********* MAG*P3 |
| | _____________|
|________ _↓___↓_
| \ /
| \ + /
| \_/
| |
↓ ↓
***************
* *
OSCIL * *
U4 * P6 *
* *
* *
********* INSTRUMENT FM;
| OSCIL(P4,MAG/P2,P5);
↓ INTRP(P7*P9*MAG,P8*P9*MAG,P10);
***** OSCIL(U2,P9*MAG,P11);
* OUT * OSCIL(U1,U3+P3*MAG,P6);
* A * OUTA←OUTA+U4; END;
*****
The following functions should be set up to test the FM instrument.
ARRAY F1,F2,F3(512);
SYNTH(F1); 1 1 999; < A sine wave.
SEG(F2);0,1 .9,4 1,8 1,72 .8,88 .5,95 0,100; < Envelope
SEG(F3); 0,1 1,100; < An upward slope or ramp.
The following will produce a shift from a pure sine tone to a
highly modulated tone over a period of 2 seconds.
PLAY; FM 0 2 100 1000 F2 F1 0 10 100 F3 F1; FINISH;
To reverse the procedure, i.e. change from the modulated tone
to the pure tone, reverse the values of P7 and P8.
P7←10; P8←0; PLAY;FM;FINISH;
Change F3 (the ramp) to make the modulation emerge only in
the mid-part of the note.
SEG(F3); 0,1 1,50 0,100; < Makes a pyramid.
PLAY;FM;FINISH;
Try several of the variations suggested in Chowning's article.
********** APPENDIX XXX NOT COMPLETE!!!XXX ************
The main program for sound generation is currently called MUSIC.FAI
or some similar name. The export version is designed to run on
a standard PDP10 DEC system (which has a "FAIL" compiler.)
The main program must be loaded with two subroutine packages which
are called MUSF4.F4 (OR MUSEXP.F4) and MUSIO.FAI (or EXPIO.FAI.) The
FORTRAN routines are for the creation of function arrays and for
organizing the output of sound samples to tape or disk after they
have been computed. The FAIL routines are for fast output of blocks
of samples.
See SCORE.LCS[UP,DOC] for information on longplaying features (RCDFLG
and BIGBIT) and much other information.
************ LOCAL SPEAKERS ***********
To hear all sounds produced by the D-A converter from the
small speaker associated with your TTY console hit the 'ESC' key
followed by the '3', and then the 'U'. (ESCAPE 3 U).
********* SOME INFO RE. THE 'FUNC' PROGRAM ***********
CRUNCH: Any two functions already in a single .DAT file may be
"crunched" together. Also, a function may be created by either the
SEG or SYNTH routines and then if instead of typing "F" for FINISH
the letter "Z" is typed the program will jump immediately to "crunch"
mode. At this point the new function may be combined with any
function found in the file presently in core. Note however that once
this new function is processed by any of "crunch" options its
original form cannot be regained without going back to ordinary SEG
or SYNTH mode.
PLOTTING: If "SP" (=see on the plotter) is typed single functions
can be drawn on the Calcomp plotter. The size asked for is in
inches. "SA" (=see all on plotter) will plot all the functions found
in a single file.
"SX" (=see all on the XGP) will draw all functions from a single
file in the proper size for printing by the XGP. In order to use
"SX" you must!!! follow the next steps exactly!!!
Before running FUNC type: A DSK PLT <CR>. This will cause the
instructions FUNC sends to the plotter to be written in a
file on the disk.
When the FUNC program finishes then type R X <CR>.
This runs a program called X which converts plotter
information to XGP commands.
X will ask you 5 questions. You should answer as follows:
PLOT.BIN <CR> (the file name)
<CR> (plot slice?)
5 <CR> (shift 5 inches)
<CR> (use default value of 11".)
1 <CR> (1 inch from the left)
Y (yes, delete the plot file)
Information re. WAVES. To run it type R WAVES.
This will allow you to display the actual wave shapes of sound
computed by MUS10. The TEST.SND file thus produced is read by WAVES.
You may display up to 3072 samples at a time but since only 1024
separate positions can be shown at once, larger numbers will cause
some samples to be skipped over (but with no great loss.) After each
group of samples is displayed a <CR> will move on to the next group.
If a number is typed, that will set the extent of the next group. If
the number -1 is given, the program will automatically cycle through
all available samples by groups of the last given number. (When no
more samples are to be found it will end with an error message.) In
order to make the program go backwards type any number less than
-2 for the number of samples you wish to back up.
This program should be of use in seeing the wave shapes produced by
amplitude and frequency modulation as well as seeing the effects of
foldover, etc. Composite waves from more than one voice may be
displayed but as the complexity increases it may prove rather
difficult to glean useful information from what is seen.
(When WAVES asks "TYPE FILE NAME", a simple <CR> will be the
equivalent of typing TEST.SND <CR> .)